package axht.trade.android.listview;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.widget.ArrayAdapter;
import android.widget.ListView;

public class ArrayListViewAdapter extends AppCompatActivity {

    private ListView lv_array;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.array_list_view_adapter);
        lv_array = findViewById(R.id.lv_array);

        String[] datas = {"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"};

        ArrayAdapter<String> arrayAdapter = new ArrayAdapter<String>(this,R.layout.array_item, datas);
        lv_array.setAdapter(arrayAdapter);

    }
}
